//
//  PickViewController.m
//  2017classone
//
//  Created by M on 17/3/13.
//  Copyright © 2017年 apple1512. All rights reserved.
//

#import "PickViewController.h"

@interface PickViewController () <UIPickerViewDataSource,UIPickerViewDelegate>

@end

@implementation PickViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    UIPickerView *pickView = [[UIPickerView alloc]initWithFrame:CGRectMake(50, 100, 300, 80)];
    
    _teams = [NSArray arrayWithObjects:@"唐超", @"钟纪旺",@"殷佼",@"胡烟雨",@"丑逼",nil];
    
    pickView.delegate = self;
    pickView.dataSource = self;
    
    [self.view addSubview:pickView];
}

- (NSInteger) numberOfComponentsInPickerView:(UIPickerView *)pickerView
{

    return 1;

}

- (NSInteger) pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component
{

    return _teams.count;


}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
